//
//  NetworkingManager.h
//  网络练习
//
//  Created by 张令林 on 16/8/29.
//  Copyright © 2016年 itcast. All rights reserved.
//


#import "AFHTTPSessionManager.h"

typedef void (^successBlock)(id data);
typedef void (^failedBlock)(NSError *error);
typedef void (^errorBlock)(NSString *message);

@interface NetworkingManager : AFHTTPSessionManager
//生成网络访问的管理器
+ (instancetype)shareManager;
// GET请求方法
+ (void)getUrlString:(NSString *)url
		   withParam:(NSDictionary *)param
	withSuccessBlock:(successBlock)success
	 withFailedBlock:(failedBlock)failed
	  withErrorBlock:(errorBlock)error;
// POST请求方法
+ (void)postUrlString:(NSString *)url
			withParam:(NSDictionary *)param
	 withSuccessBlock:(successBlock)success
	  withFailedBlock:(failedBlock)failed
	   withErrorBlock:(errorBlock)error;


@end
